define(["dojo/_base/declare"], function(declare) {
	return declare("SDTDTLayer", esri.layers.TiledMapServiceLayer, {
		constructor: function() {
			this.spatialReference = new esri.SpatialReference({ wkid: 4326 });
			this.initialExtent = (this.fullExtent = new esri.geometry.Extent(114.229839088925,33.9389305555556,123.400530149205,38.9048194444444, this.spatialReference));
			this.tileInfo = new esri.layers.TileInfo({
					"rows": 256,
                    "cols": 256,
                    "compressionQuality": 0,
                    "origin": {
                        "x": -180,
                        "y": 90
                    },
                    "spatialReference": {
                        "wkid": 4326
                    },
                    "lods": [
                        { "level": 7, "resolution": 0.010986328888003667, "scale": 4622334 },
                        { "level": 8, "resolution": 0.00549316406371503, "scale": 2311166.84 },
                        { "level": 9, "resolution": 0.002746582031857515, "scale": 1155583.42 },
                        { "level": 10, "resolution": 0.0013732910159287575, "scale": 577791.71 },
                        { "level": 11, "resolution": 6.86645496080416E-4, "scale": 288895.85 },
                        { "level": 12, "resolution": 3.4332275992417065E-4, "scale": 144447.93 },
                        { "level": 13, "resolution": 1.7166136807812273E-4, "scale": 72223.96 },
                        { "level": 14, "resolution": 8.583068403906137E-5, "scale": 36111.98 },
                        { "level": 15, "resolution": 4.291534201953068E-5, "scale": 18055.99 },
                        { "level": 16, "resolution": 2.1457682893727953E-5, "scale": 9028 },
                        { "level": 17, "resolution": 1.0728841446863976E-5, "scale": 4514 },
                        { "level": 18, "resolution": 5.364420723431988E-6, "scale": 2257 }
                    ]
			});
			this.loaded = true;
            this.onLoad(this);
		},
		getTileUrl: function(level, row, col) {
			return "http://www.sdmap.gov.cn/tileservice/SDPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=c&TILEMATRIX=" + level + "&TILEROW=" + row + "&TILECOL=" + col + "&FORMAT=tiles";
		}
	});
});